import java.io.Reader;

/**
 * Interface for parser. Parses programs written in URBAN language as described
 * in http://www.cse.ohio-state.edu/~al/sp2012/sp2012.machine.v1.pdf
 * 
 */
public interface IParser {

	/**
	 * Parses the file, generating a Symbol Table and Listing Table Input is
	 * parsed in the following format, with each part separated by spaces: Label
	 * (only required for some operations), Opcode, Operands (Up to 4 allowed)
	 * ending with a semicolon. After the semicolon, all remaining text on the
	 * line is interpreted as comments.
	 * 
	 * For each line of code, the location counter, label, opcode, operands, and
	 * comments are reported and added as an entry in the ListingTable. If the
	 * line is a symbol, after being added to the listing table, the label,
	 * address, usage, and string are recorded and added as an entry in the
	 * symbol table.
	 * 
	 * @param in
	 *            Input for program
	 * @param listingTable
	 *            Listing table generated by parsing through input
	 * @param symbolTable
	 *            Symbol Table generated by parsing through input
	 * @throws Exception
	 */
	void runFirstPass(Reader in, IListing listingTable, ISymbolTable symbolTable)
			throws Exception;
}
